package cn.edu.fzu.homemaking.company.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.edu.fzu.homemaking.company.api.ChatApi;;
import cn.edu.fzu.homemaking.web.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/api/company/auth/chat")
@Api(tags = "聊天室模块")
public class ChatController {
    @Resource
    private ChatApi chatApi;

    @ApiOperation(value = "查询所有未查看的消息数量（总数量）")
    @GetMapping("/listReceiveCount")
    public Result listReceiveCount() {
        return chatApi.listReceiveCount();
    }


    @ApiOperation(value = "查询未查看的消息（发送人员和消息数量）")
    @GetMapping("/listUserCount")
    public Result listUserCount() {
        return chatApi.listUserCount();
    }
}
